<extend name="Public/base"/>

<block name="body">

<!-- 	<div class="main-title">
		<h2>提现列表</h2>
	</div> -->
    <div class="cf" style="margin-top: 5px;margin-left:-50px;margin-bottom:10px;">
        <div style="float: left;padding-left: 50px;" class="">总佣金：<span style="color: #ff6600">{$sum.yongjin}</span>元</div>
        <div style="float: left;padding-left: 50px;" class="">总分润:<span style="color: #c43c35">{$sum.divide}</span>元</div>
        <div style="float: left;padding-left: 50px;" class="">总交易量:<span style="color: #c43c35">{$sum.t_money}</span>元</div>
        <div style="float: left;padding-left: 50px;" class="">今日进账：<span style="color: #0000ff">{$sum.td_in}</span>元</div>
        <div style="float: left;padding-left: 50px;" class="">今日提现:<span style="color: #c43c35">{$sum.td_out}</span>元</div>

    </div>

    <!--<div class="cf">-->
        <!--<div class="fl">-->
            <!--<a class="btn" href="{:U('tixian?type=today')}">只看今日</a>-->
            <!--<a class="btn" href="{:U('tixian?type=success')}">提现成功</a>-->
            <!--<a class="btn" href="{:U('tixian?type=fail')}">提现失败</a>-->

        <!--</div>-->
        <!---->
        <!--&lt;!&ndash; 高级搜索 &ndash;&gt;-->
        <!--<div class="search-form fr cf">-->
            <!--<div class="sleft">-->
                <!--<input name="title" class="search-input" value="" placeholder="店名、编号、单号" type="text">-->
                <!--<a class="sch-btn" href="javascript:;" id="search" url="{:U('find_tixian')}"><i class="btn-search"></i></a>-->

            <!--</div>-->

        <!--</div>-->
    <!--</div>-->

	<div class="data-table table-striped" >
		<table style="font-size:14px;">
			<thead>
				<tr>
                    <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
					<th>ID</th>
					<th>姓名</th>
                    <th>到账支付宝</th>
                    <th>提现金额</th>
                    <th>平台单号</th>
                    <th>支付宝单号</th>
                    <th>提现时间</th>
                    <th>提现状态</th>
                    <th>失败原因</th>
				</tr>
			</thead>
			<tbody>
				<notempty name="_list">
				<volist name="_list" id="rows">
					<tr>
                        <td><input class="ids" type="checkbox" name="id[]" value="{$rows['id']}" /></td>
                        <php>
                            $one=D('Ptyh')->where('uid='.$rows['uid'])->find();
                        </php>
						<td>{$rows['id']}</td>
						<td>{$one['name']}</td>
                        <td>
                            
                            {$one['alipay']}
                        </td>
                        <td>{$rows['money']}</td>
                        <td>{$rows['out_biz_no']}</td>
                        <td>{$rows['order_id']}</td>
                        <td>
                            <php>
                                echo date("Y-m-d H:i:s",$rows['time']);
                            
                            </php>
                        </td>
                        <td>
                            <php>
                                if($rows['status']==0){
                                    echo '交易失败';
                                }else{
                                    echo '交易成功';
                                }
                            </php>
                        </td>
                        
						<td>{$rows.cause}
						</td>
					</tr>
				</volist>
				<else/>
				<td colspan="14" class="text-center"> aOh! 暂时还没有内容! </td>
				</notempty>
			</tbody>
		</table>



	</div>


    <div class="page"  style="float:left;margin-right:300px;">{$_page}</div>
</block>

<block name="script">
    <link href="/Public/static/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <link href="/Public/static/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/Public/static/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="/Public/static/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
    $(function(){
        //搜索功能
        $("#search").click(function(){
            var url = $(this).attr('url');
            var status = $("#sch-sort-txt").attr("data");
            var type   = $("#sch-sort-txt_type").attr("data");
            var query  = $('.search-form').find('input').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
            query = query.replace(/^&/g,'');
            if(status != ''){
                query += '&status=' + status + "&" + query;
            }
            if(type != ''){
                query += '&type=' + type + "&" + query;
            }
            if( url.indexOf('?')>0 ){
                url += '&' + query;
            }else{
                url += '?' + query;
            }
            window.location.href = url;
        });

        Think.setValue("extend", {$info.extend|default=0});
        //导航高亮
        highlight_subnav('{:U('tixian')}');


            //回车搜索
            $(".search-input").keyup(function(e){
                if(e.keyCode === 13){
                    $("#search").click();
                    return false;
                }
            });


    })


</script>
</block>